import { ref, computed } from "vue";
import { useStore } from "vuex";
import Constants from "../contants";

export default function useWindowSize() {
  const store = useStore();

  let innerHeight = computed(() => store.state.window.innerHeight);

  let innerWidth = computed(() => store.state.window.innerWidth);

  const topBarHeight = ref(Constants.TITLE_BAR_HEIGHT);
  const bottomBarHeight = ref(Constants.BOTTOM_BAR_HEIGHT);

  return {
    innerHeight,
    innerWidth,
    topBarHeight,
    bottomBarHeight,
  };
}
